﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.ComponentModel;

namespace Chinaer.WCF.Contracts
{
    public partial interface IChinaer
    {
        [OperationContract]
        [WebInvoke(Method = "GET",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "GetMenuDeatilByMenuCategory/{menuCategoryID}/{apiToken}")]
        [Description("根据菜单类别编号获取菜单明细")]
        List<DTO.MenuDetailDTO> GetMenuDeatilByMenuCategoryID(string menuCategoryID,string apiToken);

        [OperationContract]
        [WebInvoke(Method = "GET",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "GetMenuDeatilByID/{menuDeatilID}/{apiToken}")]
        [Description("根据菜单明细编号获取菜单明细详细信息")]
        DTO.MenuDetailDTO GetMenuDeatilByID(string menuDeatilID,string apiToken);

        [OperationContract]
        [WebInvoke(Method = "POST",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "AddMenuDeatil")]
        [Description("添加菜单明细信息")]
        Chinaer.Model.Common.JsonResult AddMenuDeatil(DTO.MenuDetailDTO menuDeatilDTO);

        [OperationContract]
        [WebInvoke(Method = "GET",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "DeleteMenuDetailByID/{menuDeatilID}/{apiToken}")]
        [Description("根据菜单明细编号删除菜单明细信息")]
        Chinaer.Model.Common.JsonResult DeleteMenuDetailByID(string menuDeatilID, string apiToken);

        [OperationContract]
        [WebInvoke(Method = "POST",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "DeleteMenuDeatil")]
        [Description("删除菜单明细信息")]
        Chinaer.Model.Common.JsonResult DeleteMenuDeatil(DTO.MenuDetailDTO menuDetailDTO);

        [OperationContract]
        [WebInvoke(Method = "POST",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "UpdateMenuDetail")]
        [Description("更新菜单明细信息")]
        Chinaer.Model.Common.JsonResult UpdateMenuDetail(DTO.MenuDetailDTO menuDetailDTO);

        [OperationContract]
        [WebInvoke(Method = "GET",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "GetMenuDetailByDianPuID/{dianPuID}/{apiToken}")]
        [Description("根据店铺编号获取菜单菜色列表")]
        List<DTO.MenuDetailDTO> GetMenuDetailByDianPuID(string dianPuID,string apiToken);
    }
}
